import {getUserInfo2} from 'utils/Api'
export const GETUSERINFO = 'user/GETUSERINFO'

export const getUserInfo = function () {
  return (dispatch, getState) => {
    getUserInfo2()
      .then(({result}) => {
        dispatch({
          type: GETUSERINFO,
          payload: result
        })
      })
      .catch(error => {
        console.log('GET_DATA_FAILED')
      })
  }
}